<!DOCTYPE html>
<!-- html:5 缩写-->
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .progress {
        padding: 0.3vw 0.3vw;
        background-color: black;
        width: 95vw;
        height: 3vh;
        border-radius: 3vh;
    }
    
    .inner {
        height: 100%;
        border-radius: 3vh;
        background-color: #39c5bb;
        transition: all 1s ease-in-out;
        position: relative;
    }
    
    .inner>span {
        position: absolute;
        right: -20px;
        bottom: -100%;
    }
</style>

<body>
    <!-- div#app 缩写  综合案例 Todolist-->
    <div id="app">
        <div class="progress">
            <!-- Vue对行内样式的操作---操作style -->
            <div :style="{width:percent+'%'}" class="inner">
                <span>{{percent+"%"}}</span>
            </div>
        </div><br><br>
        <button @click="percent=0">设置0%</button>
        <button @click="percent=25">设置25%</button>
        <button @click="percent=50">设置50%</button>
        <button @click="percent=75">设置75%</button>
        <button @click="percent=100">设置100%</button>
    </div>
    <script src="vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                percent: 0,
            },
            methods: {},
        })
    </script>
</body>

</html>